import request from './request.js'
import proxyRequest from "./Proxyrequest.js";

request.defaults.baseURL ="http://127.0.0.1:3000/public/"

proxyRequest.defaults.baseURL=process.env.VUE_APP_REQUEST_URL
const loadTypes=function(){
   return  request.get('types')
}
const loadFilms = function (params={}){
 return    request.get('films',{
    params
 })

}
const loadTypesProxy = function () {
   return proxyRequest.get('types')
}
const loadFilmsProxy = function (params = {}) {
   return proxyRequest.get('films', {
      params
   })

}
export default {
    loadTypes, loadFilms,
   loadTypesProxy, loadFilmsProxy
}